Capacity To Ship Packages - Leetcode 1011 - Python